package com.piz.model.common;

public enum ItemClassificationEnum {
	
	 VEG(1, "veg"), NONVEG(2, "nonveg"), EGGY(3, "eggy");
	
	 
	 private long classificationId; 

	private String classificationName;
	
	ItemClassificationEnum(int classificationId, String classificationName)
	  {
	    this.classificationId = classificationId;
	    this.classificationName = classificationName;
	  }
	
	// the valueOfMethod
	  public static ItemClassificationEnum valueOf(int value) throws Exception
	  {
	    switch (value)
	    {
	      case 1 :
	        return VEG;
	      case 2 :
	        return NONVEG;
	      case 3 :
	        return EGGY;
	      
	    }
	    throw new Exception("Could not find Activity Type for Id:" + value);
	  }

	  // the valueOfMethod
	  public static ItemClassificationEnum valueOfString(String name) throws Exception
	  {
		  ItemClassificationEnum[] values = ItemClassificationEnum.values();
	    for (ItemClassificationEnum classification : values)
	    {
	      if (name.equals(classification.classificationName))
	      {
	        return classification;
	      }
	    }
	    throw new Exception("Could not find Activity Type for name:" + name);
	  }

	  // the identifierMethod
	  public long getId()
	  {
	    return classificationId;
	  }

	  public String getName()
	  {
	    return this.classificationName;
	  }


}
